from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from postion import options
from postion import service
from login_para import Login

url=r'http://192.168.92.131/upload/'
driver=webdriver.Chrome(options=options,service=service)
driver.get(url)
driver.maximize_window()
#注册
driver.find_element(By.LINK_TEXT,'立即注册').click()
driver.find_element(By.ID,'IouQbW').clear()
driver.find_element(By.ID,'IouQbW').send_keys('sky4')
sleep(2)
driver.find_element(By.ID,'cWFNZj').clear()
driver.find_element(By.ID,'cWFNZj').send_keys('123456')
sleep(2)
driver.find_element(By.ID,'d8wZnh').clear()
driver.find_element(By.ID,'d8wZnh').send_keys('123456')
sleep(2)
driver.find_element(By.ID,'tu7mNL').clear()
driver.find_element(By.ID,'tu7mNL').send_keys('1554567@qq.com')
sleep(2)
driver.find_element(By.ID,'registerformsubmit').click()
sleep(6)
#退出
login=Login(driver)
login.logout()
# driver.find_element(By.LINK_TEXT,'退出').click()
# sleep(3)
driver.quit()